package com.fdb.efp.nls.service.dao;

import com.fdb.efp.nls.service.domain.RiskClassfyCfg;
import com.fdb.efp.nls.service.vo.RiskClassfyCfgVO;

import java.util.List;

/**
 * <p>DAO interface:风险分类配置表				<p>
 * @author fuzm
 * @date 2018-05-08
 */
public interface RiskClassfyCfgDao {
	
	public int insertRiskClassfyCfg(RiskClassfyCfg riskClassfyCfg);
	
	public int deleteByPk(RiskClassfyCfg riskClassfyCfg);
	/**
	 * 只更新数据
	 * @param riskClassfyCfg
	 * @return
	 */
	public int updateByPk(RiskClassfyCfg riskClassfyCfg);
	/**
	 * 更新数据并且生效
	 * @param riskClassfyCfg
	 * @return
	 */
	public int updateSubmitByPk(RiskClassfyCfg riskClassfyCfg);
	/**
	 * 失效
	 * @param riskClassfyCfg
	 * @return
	 */
	public int updateDisabledByPk(RiskClassfyCfg riskClassfyCfg);
	
	public RiskClassfyCfg queryByPk(RiskClassfyCfg riskClassfyCfg);
	
	public List<RiskClassfyCfg> queryAllOwnerByPage(RiskClassfyCfgVO riskClassfyCfg);
	
	public List<RiskClassfyCfg> queryAllCurrOrgByPage(RiskClassfyCfgVO riskClassfyCfg);
	
	public List<RiskClassfyCfg> queryAllCurrDownOrgByPage(RiskClassfyCfgVO riskClassfyCfg);
	/**
	 * 查询风险分类配置下的清单总数
	 * @param riskClassfyCfg
	 * @return
	 */
	public int queryRiskClassfyListCount(RiskClassfyCfgVO riskClassfyCfg);
	/**
	 * 查询已生效的风险分类配置总数
	 * @return 若已存在已生效的风险分类配置，则不允许新增风险分类配置!
	 */
	public int queryEnableRiskCfgCount();
}
